//
//  IPLibTabBar.m
//  IPLibTest
//
//  Created by hcm-sd-imac5 on 4/17/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "IPLibTabBar.h"

@implementation IPLibTabBar
- (id)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self AddTabBar];
        
    }
    return self;
    
}
-(void)AddTabBar
{
    
    UITabBarItem *cover=nil;
    UITabBarItem *nav=nil;
    UITabBarItem *store=nil;
    
    NSString *str=APP_DELEGATE.langId;
    if([str  isEqualToString:@"eng"])
    {
        cover = [[UITabBarItem alloc] initWithTitle:titleTabBar_1_EL image:[UIImage imageNamed:ImageTabBar_1] tag:tagTABBAR_1];
        nav = [[UITabBarItem alloc] initWithTitle:titleTabBar_2_EL image:[UIImage imageNamed:ImageTabBar_2] tag:tagTABBAR_2];
        store = [[UITabBarItem alloc] initWithTitle:titleTabBar_4_EL image:[UIImage imageNamed:ImageTabBar_4] tag:tagTABBAR_4];
    }
    else
    {
        cover = [[UITabBarItem alloc] initWithTitle:titleTabBar_1_VN image:[UIImage imageNamed:ImageTabBar_1] tag:tagTABBAR_1];
        nav = [[UITabBarItem alloc] initWithTitle:titleTabBar_2_VN image:[UIImage imageNamed:ImageTabBar_2] tag:tagTABBAR_2];        
        store = [[UITabBarItem alloc] initWithTitle:titleTabBar_4_VN image:[UIImage imageNamed:ImageTabBar_4] tag:tagTABBAR_4];
    }
        
    NSArray *menuItems = [[NSArray alloc] initWithObjects:
                          cover,                         
                          nav,
                          store,                          
                          nil];
    
    [self setItems:menuItems];
    [cover release];
    //[toc release];
    [store release];
    [nav release];
    [menuItems release];
    
    
    
    
}

-(void)dealloc
{
    [super dealloc];
}
@end
